class Person:
    def __init__(self,name,weight):
        self.name=name
        self.weight=weight
    def run(self):
        self.weight=self.weight-0.5
    def eat(self):
        self.weight=self.weight+1
    def __str__(self):
        return  f'姓名为{self.name}体重为{self.weight}'

xiaoming=Person(name='小明',weight=100.0)

xiaoming.eat()
print(xiaoming.weight)

xiaomei=Person(name='小妹',weight=100.0)

xiaomei.eat()
print(xiaomei)